<template>
  <el-tooltip class="item" effect="dark" :content="copy ? '已复制' : '复制'" placement="top">
    <el-button size="mini" v-if="!copy" class="el-icon-document-copy" @click="docopy"></el-button>
    <el-button size="mini" v-else class="el-icon-circle-check"></el-button>
  </el-tooltip>
</template>

<script>
export default {
  props: {
    copy: {
      type: Boolean,
      required: true
    }
  },
  methods: {
    docopy () {
      this.$emit('doCopy')
    }
  }
}
</script>

<style>

</style>